package com.xty.itgroup.tech05tytex.Mapper.Impl;

import com.xty.itgroup.tech05tytex.Databean.*;
import com.xty.itgroup.tech05tytex.Mapper.Mapper01Base;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class Impl01Base implements Mapper01Base {
    @Autowired
    private Mapper01Base base;
    @Override
    public void deleteYarns() {
        base.deleteYarns();
    }

    @Override
    public void addYarns(List<Map<String, Object>> yarns) {
        base.addYarns(yarns);
    }

    @Override
    public void deleteYarnsNew() {
        base.deleteYarnsNew();
    }

    @Override
    public void addYarnsNew(List<Map<String, Object>> yarns) {
        base.addYarnsNew(yarns);
    }

    @Override
    public void deleteGreyBom() {
        base.deleteGreyBom();
    }

    @Override
    public void addGreyBom(List<Map<String, Object>> boms) {
        base.addGreyBom(boms);
    }

    @Override
    public void deleteGreyBomMain() {
        base.deleteGreyBomMain();
    }

    @Override
    public void addGreyBomMain(List<Map<String, Object>> boms) {
        base.addGreyBomMain(boms);
    }

    @Override
    public void addTag(Bean01YarnTag tag) {
        base.addTag(tag);
    }

    @Override
    public void updateTag(int id) {
        base.updateTag(id);
    }
    @Override
    public void updateTagByParentId(int parent_id,int new_id) {
        base.updateTagByParentId(parent_id, new_id);
    }
    @Override
    public List<Bean02YarnTags> listYarnsByTag(String tag1, String tag2, String tag3, String tag4) {
        return base.listYarnsByTag("%"+tag1+"%", "%,"+tag2, tag3+",%", tag4);
    }

    @Override
    public List<Bean02YarnTags> listYarnTagsByIds(String yarn_ids) {
        return base.listYarnTagsByIds(yarn_ids);
    }

    @Override
    public List<Bean01YarnTag> listTags() {
        return base.listTags();
    }

    @Override
    public void addYarnTags(List<Bean02YarnTags> tags) {
        base.addYarnTags(tags);
    }

    @Override
    public void updateYarnTags(String yarn_ids) {
        base.updateYarnTags(yarn_ids);
    }

    @Override
    public Bean02YarnTags getYarnTag(int id) {
        return base.getYarnTag(id);
    }

    @Override
    public void calcualtUnit() {
        base.calcualtUnit();
    }

    @Override
    public List<Bean01YarnNew> listYarns(String yarn_name,int type) {
        return base.listYarns(yarn_name==null?"%%":"%"+yarn_name+"%",type);
    }

    @Override
    public List<Bean02ClothTags> listClothByTag(String tag1, String tag2, String tag3, String tag4) {
        return base.listClothByTag(tag1, tag2, tag3, tag4);
    }

    @Override
    public void updateClothTags(String names) {
        base.updateClothTags(names);
    }

    @Override
    public void addClothTags(List<Bean02ClothTags> tags) {
        base.addClothTags(tags);
    }

    @Override
    public void addClothTag(Bean02ClothTags tag) {
        base.addClothTag(tag);
    }

    @Override
    public List<Bean02ClothBom> listProduct(String product_name) {
        return base.listProduct(product_name==null?"%%":"%"+product_name+"%");
    }

    @Override
    public Bean02ClothBom getProduct(String product_name) {
        return base.getProduct(product_name);
    }

    @Override
    public Bean02ClothTags getClothByName(String product_name) {
        return base.getClothByName(product_name);
    }

    @Override
    public void deleteClothTags(int id) {
        base.deleteClothTags(id);
    }

    @Override
    public List<Map<String, Object>> listBomDetail(String product_name) {
        return base.listBomDetail(product_name);
    }

    @Override
    public List<Map<String, Object>> listYarnsWithUnit(String yarn_name) {
        return base.listYarnsWithUnit(yarn_name==null?"%%":"%"+yarn_name+"%");
    }

    @Override
    public List<Map<String, Object>> listClothWithUnit(String product_name,int flag) {
        return base.listClothWithUnit(product_name==null?"%%":"%"+product_name+"%",flag);
    }

    @Override
    public List<Map<String, Object>> listClothWithUnit1(String product_name,int flag) {
        return base.listClothWithUnit1(product_name,flag);
    }
}
